<?php

use Illuminate\Database\Capsule\Manager as DB;
use  Illuminate\Database\Eloquent\Model as Eloquent;

class BaseModel extends Eloquent
{
    protected $_model;
    protected $_table;
    public static $dbConfig = [];

    public function __construct()
    {
        $DB = new DB;
        $DB->addConnection(self::$dbConfig);
        // 设置全局静态可访问
        $DB->setAsGlobal();
        // 启动Eloquent
        $DB->bootEloquent();

    }
}